﻿<%@ Page Title="" Language="C#" MasterPageFile="~/masterPage.Master" AutoEventWireup="true" CodeFile="newsView.aspx.cs" Inherits="newsView" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:Repeater ID="RepeaterNews" runat="server" DataSourceID="SqlDataSourceNews">
        <ItemTemplate>
            <div class="news_title">
                <h3>
                    <asp:Label ID="LabelNewsView" runat="server" Text='<%#Eval("xwName") %>'></asp:Label>
                </h3>
            </div>
            <div class="news_info">
                <span class="news_info_text">作者：</span>
                <asp:Label ID="LabelAuthor" runat="server" Text='<%#Eval("xwauthor") %>'></asp:Label>
                <span class="news_info_text">发布时间：</span>
                <asp:Label ID="LabelPosttime" runat="server" Text='<%#Eval("xwTime") %>'></asp:Label>
            </div>
            <div class="news_context" style="overflow: auto; height: 800px; width: 520px;">
                <asp:Label ID="LabelContext" runat="server" Text='<%#Eval("xwContent") %>'></asp:Label>
            </div>
        </ItemTemplate>
    </asp:Repeater>
    <asp:SqlDataSource ID="SqlDataSourceNews" runat="server" 
        ConnectionString="<%$ ConnectionStrings:LabInfoManageSystemConnectionString %>" 
        SelectCommand="SELECT * FROM [xwgg] WHERE ([xwID] = @xwID)">
        <SelectParameters>
            <asp:QueryStringParameter Name="xwID" QueryStringField="newsID" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>

